1. Field of the Invention
The present invention relates generally to computer system mass storage devices. Specifically, the present invention relates to a disk drive controller circuit and method for checking and managing defective and/or undesired sectors on a disk.
2. Brief Description of the Related Art
Computer systems often include a host system and one or more peripheral storage devices that store and/or provide access to data. One type of peripheral storage device is a hard disk drive. A hard disk drive typically comprises at least one platter (collectively xe2x80x9cthe diskxe2x80x9d), which is rotated by a motor, an actuator that moves a transducer to various locations over the disk, a microprocessor, a disk drive controller (xe2x80x9ccontrollerxe2x80x9d) and various other electrical circuitry. The controller is typically an integrated circuit which is mounted to a printed circuit board within the disk drive. The microprocessor can be physically embedded within or external to the controller integrated circuit.
The controller (under the control of the microprocessor) commonly controls most of the operations of the disk drive, including handling data from the host computer (xe2x80x9chost systemxe2x80x9d or simply xe2x80x9chostxe2x80x9d) to be stored on a disk during a write operation and passing data back to a requesting host computer during a read operation. The controller is used to retrieve and send data to and from the disk surface. The controller commonly encodes the data so that it can be successfully transferred to and from the disk.
The disk often includes a set of rotating platters which store data. Data can be written to the disk or read from the disk any number of times, and the data remains intact after the disk drive is turned off. A platter may have two writable surfaces. Each writable surface stores data on concentric rings called tracks. The number of tracks may vary from disk to disk. The tracks are divided radially into sectors, which are the smallest writable/readable unit of a track. The number of sectors may vary per track and may vary from disk to disk because disk manufacturers may have different disk configurations. There may be 200 or more sectors per track. Each sector includes data, information about the sector, and synchronization information.
There are two general types of defects which can occur on a disk platter: manufacturing defects and grown defects. Manufacturing defects are defects that occur and are detected during manufacture. When disks are formatted at the factory during manufacture, a factory algorithm determines which sectors are initially defective and creates a list of sector addresses of all detected manufacturing defects. The procedure of recording manufacturing defects may be different from disk to disk and may be unique to each disk manufacturer. The factory algorithm stores the list of manufacturing defect addresses on the disk of the disk drive as either physical addresses or logical block addresses, depending on the manufacturer""s defined implementation of its disk drive. The disk drive uses the list to perform xe2x80x98slipping,xe2x80x99 which means for every sector with a manufacturing defect, the address (either physical or logical, depending on the manufacturer""s defined implementation) of the next sector to be read or written is logically incremented from the address of the last good sector. Thus, during disk drive operation, the disk drive does not read or write a sector with a manufacturing defect because the address of that sector has been incremented to the next good sector.
The other general type of defects are called grown defects, which occur and/or are detected after manufacture. Grown defects include sectors which the disk drive determines to be unreadable or unusable, such as during a format operation. Grown defects are detected and recorded typically when a sector is read, but the process may differ depending on the manufacturer""s defined implementation. The data from each sector with a grown defect is re-assigned to a non-defective sector.
As with manufacturing defects, the locations of grown defects and their re-assigned sector addresses are typically stored on the disk as either physical or logical addresses, depending on the manufacturer""s defined implementation. The grown defect locations may be transferred from the disk to a random access memory (RAM) each time the disk drive is powered on.
Some disk drive controllers include one or more registers which are used to temporarily store the addresses of defective sectors to be skipped or re-assigned during a current read or write operation.
One drawback with some disk drive controllers is the limited number of registers in the disk drive controller which are assigned to identify defective sectors on a track to be skipped or re-assigned during a read or write operation. The number of registers restricts the total number of defective sectors that can be skipped or re-assigned during a read or write operation. In some disk drives, the number of defects on a particular track may be greater than the number of available registers used to identify defects on a track. Adding more registers would require adding more gates, which increases the cost of manufacturing the disk drive controller.
In addition to manufacturing costs, another drawback to adding more registers is trying to guess in advance how many registers are sufficient to handle all the defects of a particular track of a particular disk platter. Different disk platters may have a different number of sectors per track and a different number of tracks. Moreover, as disk technology improves, the number of sectors per track may increase, which may lead to more defective sectors to be managed, skipped, and/or re-assigned by the disk drive controller.
One solution is to partition the defect management operation into multiple parts because the controller can only skip a certain number of defective sectors for a given read or write operation (based on the limited number of registers). If each part of a multi-part defect management operation skipped or re-assigned a particular number of defective sectors, then there may be enough registers to handle most or all of the defects on a particular track. But splitting the defect management operation into multiple parts increases the time of the overall defect management operation and degrades disk drive performance. An important goal in current disk drives is to minimize the amount of time for read and write operations.
The present invention relates to a disk drive controller circuit and method for keeping track of defective and/or undesired sectors on a disk and skipping such defective or undesired sectors during read or write operations. The present invention recognizes and takes advantage of the fact that defective sectors tend to be in close proximity with each other and are often found together in groups of contiguous or consecutive sectors. The disk drive controller of the present invention uses xe2x80x98skip range check registersxe2x80x99 or xe2x80x98skip check registersxe2x80x99 which can store the locations of ranges of consecutive defective sectors.
By storing the defective sector information within the controller as ranges of defective sectors, the present invention may reduce the quantity of registers and/or register logic needed to keep track of defects. Alternatively, the present invention may increase (over prior designs) the number of defective sectors that can be handled during a read or write operation without a substantial increase in register logic.
Furthermore, because the disk drive is configured to read or write data on a track continuously sector-by-sector, the skip range check registers allow the controller to quickly skip the defective sectors in groups instead of single units. Thus, the disk drive controller circuit and method of the present invention reduces the problems of adding more registers, trying to guess how many more registers are needed, and partitioning the defect management operation into multiple parts.
Various disk drive manufacturers may use various defect management schemes. Any one of a variety of known defect management schemes may be used with the present invention.
One embodiment also allows the host system to skip or mask certain undesired sectors during a read or write operation. These sectors are not defective, but they are undesired by the host system during a particular read or write operation.
One aspect of the present invention relates to a disk drive controller in a disk drive configured to read and write data to one or more sectors on one or more tracks of a disk as requested by a host system. The disk drive controller comprises at least one register configured to store (a) a sector address of a first sector to be skipped during a read or write operation; and (b) a range value which indicates a number of consecutive sectors to be skipped during the read or write operation. The disk drive controller further comprises a control circuit configured to use the sector address and the range value to skip a range of consecutive sectors during the read or write operation. In one configuration, the control circuit comprises a state machine. One configuration of the register further comprises a re-assign bit which indicates that a particular sector or range of consecutive sectors have been re-assigned and should be skipped. Another configuration of the register further comprises an increment logical block address (LBA) bit which allows the host system to direct the controller to skip certain undesired (but not defective) sectors during a read or write operation.
Another aspect of the present invention relates to a method of skipping one or more sectors on a disk of a disk drive during a read or write operation requested by a host system. The method comprises generating a list of sectors to be skipped during the read or write operation; identifying within the list at least one range of consecutive sectors to be skipped; converting the range into an address and a range value to generate a compressed list; and loading the compressed list into a set of registers of a disk drive controller.